home *** CD-ROM | disk | FTP | other *** search
- function interrupt()
- {
- if(intro != null)
- {
- intro._visible = false;
- }
- if(mc_credits != null)
- {
- mc_credits.interrupt();
- }
- }
- function resume()
- {
- if(intro != null)
- {
- intro._visible = true;
- var obj = OverlayController.getLastOverlay();
- OverlayController.resumeOverlay(obj);
- }
- if(mc_credits != null)
- {
- mc_credits.resume();
- }
- }
- function exit()
- {
- if(blnInExit == true)
- {
- return undefined;
- }
- lingo("spriteDialog.show(\"exit\")");
- blnInExit = true;
- }
- function creditsShow()
- {
- Tardis.TardisInterface.disable(true);
- header.clearUp();
- footer.disable();
- this.createEmptyMovieClip("mc_credits",Tardis.depth++);
- mc_credits.loadMovie(ENGINE_FOLDER + "swf/credits.swf");
- gotoAndStop(18);
- }
- function creditsComplete()
- {
- lingo("");
- lingo("Flsh_exit");
- }
- function init()
- {
- Settings = {};
- xmlIssueData = new XML();
- xmlIssueData.onLoad = function()
- {
- parseIssueXML();
- delete parseIssueXML;
- delete xmlIssueData;
- UsageData.LOG_URL = Settings.tracking.log_url;
- UsageData.PING_URL = Settings.tracking.ping_url;
- with(UsageData)
- {
- init();
- addPingEntry();
- addSessionGroup();
- }
- delete UsageData.init;
- ConnCheck.onTestComplete = function(success)
- {
- Tardis.debug.addProcess("monitorTracking","ConnCheck.onTestComplete(success) : success = " + success);
- if(success)
- {
- with(Tardis.UsageData)
- {
- if(!active)
- {
- checkSend();
- }
- }
- }
- else
- {
- Tardis.UsageData.dbg("no connection");
- }
- };
- ConnCheck.TIMER_INTERVAL = Settings.tracking.interval;
- ConnCheck.startTimer();
- if(PLAY_MODE == "director")
- {
- gotoAndStop(6);
- }
- else
- {
- gotoAndStop(12);
- footer.show();
- header.clearUp();
- }
- delete Settings.tracking;
- delete init;
- };
- xmlIssueData.load(ISSUE_XMLFILE);
- }
- function parseIssueXML()
- {
- var ndRoot = xmlIssueData.firstChild;
- var ndSponsor = ndRoot.byName("sponsor");
- var ndTracking = ndRoot.byName("tracking");
- var ndIntro = ndRoot.byName("intro");
- var ndDate = ndRoot.byName("date");
- ASSETS_FOLDER = ndRoot.byName("assets").getText();
- ENGINE_FOLDER = ndRoot.byName("engine").getText();
- lingo("spriteShell.setAssetsPath(\"" + ASSETS_FOLDER + "\")");
- Sections = new SectionsList(ndRoot.byName("sections"));
- delete SectionsList;
- Colors = new ColorsObject(ndRoot.byName("colors"));
- delete ColorsObject;
- Settings = {issue_month:ndDate.attributes.month,issueMonth:ndDate.attributes.month,issue_year:ndDate.attributes.year,issueYear:ndDate.attributes.year,version:ndRoot.byName("version").getText(),FEATURE_ASSETS:ASSETS_FOLDER + "bespoke/feature"};
- Settings.tracking = {log_url:ndTracking.byName("log_url").getText(),ping_url:ndTracking.byName("ping_url").getText(),interval:ndTracking.byName("interval").getText()};
- setupIntro = function()
- {
- Settings.intro = {};
- Settings.sponsor = {};
- Settings.sponsor.files = new Array();
- tmpNode = ndIntro.firstChild;
- i = 1;
- while(tmpNode != null)
- {
- Settings.intro["ndPanel" + i] = tmpNode;
- tmpNode = tmpNode.nextSibling;
- i++;
- }
- var SponsorXML = new XML();
- SponsorXML.parseXML("<sponsor><panel id=\'3\' category=\'swf\' button=\'skipAdvert\' disableLevel=\'2\' header=\'default\'>adverts/overlays/aol/base_button.swf</panel></sponsor>");
- Settings.sponsor.files[0] = SponsorXML.firstChild.firstChild;
- Settings.intro.numberOfPanels = i - 1;
- delete tmpNode;
- delete i;
- };
- setupIntro();
- xmlPromosData = new XML();
- xmlPromosData.ignoreWhite = true;
- xmlPromosData.onLoad = function(success)
- {
- if(success)
- {
- var numPromos = this.firstChild.childNodes.length;
- if(numPromos > 0)
- {
- Settings.promos = {};
- var sectionNode = this.firstChild.firstChild;
- while(sectionNode != null)
- {
- var o = {};
- var node = sectionNode.firstChild;
- while(node != null)
- {
- var promoNode = node.firstChild;
- while(promoNode != null)
- {
- if(!Settings.promos[node.parentNode.attributes.id])
- {
- Settings.promos[node.parentNode.attributes.id] = {};
- }
- if(!Settings.promos[node.parentNode.attributes.id][promoNode.parentNode.attributes.id])
- {
- Settings.promos[node.parentNode.attributes.id][promoNode.parentNode.attributes.id] = {};
- }
- Settings.promos[node.parentNode.attributes.id][node.attributes.id][promoNode.nodeName] = promoNode.firstChild.nodeValue;
- promoNode = promoNode.nextSibling;
- }
- node = node.nextSibling;
- }
- sectionNode = sectionNode.nextSibling;
- }
- for(var o in Settings.promos)
- {
- for(var p in Settings.promos[o])
- {
- for(var h in Settings.promos[o][p])
- {
- }
- }
- }
- }
- else
- {
- trace("! There are no promos to promo - that makes me sad :(");
- }
- }
- };
- xmlPromosData.load(ASSETS_FOLDER + PROMOS_XMLFILE);
- }
- _global.error = function(str)
- {
- trace("error : " + str);
- };
- blnInExit = false;
- connTardisReceive = new LocalConnection();
- connTardisReceive.exit_cancel = function()
- {
- Tardis.blnInExit = false;
- Tardis.footer.buttonReset("exit");
- Tardis.resume();
- };
- connTardisReceive.UsageData_markExit = function()
- {
- Tardis.UsageData.addPageEntry(99);
- Tardis.UsageData.checkSend();
- Tardis.overlay.active = false;
- };
- connTardisReceive.ConnCheck_stopTimer = function()
- {
- Tardis.ConnCheck.stopTimer();
- };
- connTardisReceive.childlock_lock = function()
- {
- Tardis.ChildLock.lock();
- };
- connTardisReceive.childlock_unlock = function()
- {
- Tardis.ChildLock.unlock();
- };
- connTardisReceive.intro_nextState = function()
- {
- Tardis.intro.nextState();
- };
- connTardisReceive.UsageData_setValue = function(strSoObject, strProp, val)
- {
- Tardis.UsageData.setSoProp(strSoObject,strProp,val);
- };
- success = connTardisReceive.connect("Tardis");
-